#ifndef LOGGER_H
#define LOGGER_H

#include <QObject>
#include <QList>

#include "appender.h"

#define LOG4QT_INFO(logger,msg) logger->info(__FILE__, __LINE__, msg)

namespace Log4Qt
{
    class Logger : public QObject
    {
        Q_OBJECT
    public:
        explicit Logger(const QString &name);

        void addAppender(const QSharedPointer<Appender> &appender);
        void info(const char *fileName, int fileLine, const QString &msg);

    private:
        QString name;
        QList<QSharedPointer<Appender>> appenders;
    };
}

#endif // LOGGER_H
